package com.zyh.websocket.constant;

/**
 * 消息常量
 *
 * @author ZYH
 * @version 1.0
 * @date 2025-03-27
 */

public class MessageConstant {
    // ================= 消息主类型 =================
    public static final String SYSTEM_MSG = "0";      // 系统级消息
    public static final String CHAT_MSG = "1";        // 聊天消息
    public static final String APPROVAL_MSG = "2";    // 审核流程
    public static final String APPOINTMENT_MSG = "3"; // 预约流程

    // ================= 消息子类型 =================
    public static class SubType {
        // 系统消息
        public static final String SYSTEM_BROADCAST = "system_broadcast";

        // 聊天相关
        public static final String USER_TO_USER = "user_chat";
        public static final String USER_TO_CONSULTANT = "consultation_chat";

        // 审核流程
        public static final String APPROVAL_REQUEST = "approval_request";
        public static final String APPROVAL_RESULT = "approval_result";

        // 预约流程
        public static final String APPOINTMENT_REQUEST = "appointment_request";
        public static final String APPOINTMENT_RESULT = "appointment_result";
    }

    // ================= 路由配置 =================
    public static class Route {
        // 用户端路由
        public static final String USER_CHAT_QUEUE = "/queue/chat";
        public static final String USER_CONSULTATION_QUEUE = "/queue/consultation";
        public static final String USER_APPOINTMENT_RESULT_QUEUE = "/queue/user_appointments";
        public static final String USER_APPROVAL_RESULT_QUEUE = "/queue/user_approvals";

        // 咨询师端路由
        public static final String COUNSELOR_APPOINTMENT_QUEUE = "/queue/counselor_appointments";

        // 管理端路由
        public static final String ADMIN_APPROVAL_QUEUE = "/queue/admin_approvals";

        // 系统广播
        public static final String SYSTEM_TOPIC = "/topic/system";
    }

    // ================= 角色标识 =================
    public static final String ROLE_USER = "common";
    public static final String ROLE_CONSULTANT = "counselor";
    public static final String ROLE_ADMIN = "commonAdmin";
}

